package com.javaspeak.designpatterns.go4.structural.composite;


/**
 * TextElement extends AbstractHtmlElement to provide a simple element
 * implementation.  TextElement does not make use of its List<HtmlElement>.
 * It returns some simple text in its getHtml() method.
 *
 * @author John Dickerson
 *
 */
public class TextElement extends AbstractHtmlElement {

    private String text;

    public TextElement( String text ){

        this.text = text;
    }

    @Override
    public String getHtml() {

        return this.text;
    }
}
